import request from '@/utils/request'

export function getApiList(query) {
  return request({
    url: '/admin/api/list',
    method: 'get',
    params: query
  })
}

export function getAll() {
  return request({
    url: '/admin/api/all',
    method: 'get',
    params: {}
  })
}

export function getGroups() {
  return request({
    url: '/admin/api/groups',
    method: 'get',
    params: {}
  })
}


export function addApi(data) {
  return request({
    url: '/admin/api/add',
    method: 'post',
    data
  })
}

export function editApi(data) {
  return request({
    url: '/admin/api/edit',
    method: 'post',
    data
  })
}

export function deleteApi(data) {
  return request({
    url: '/admin/api/delete',
    method: 'post',
    data
  })
}
